package com.cloud.lan.api.manage;

import com.cloud.lan.api.dto.req.LanBadgeCfgReq;
import com.cloud.lan.entity.base.BaseResponse;
import com.cloud.lan.service.ILanBadgeCfgService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by zhouquan on 2022/5/19.
 * 徽章配置入口
 */
@RestController
@RequestMapping(value = {"/v1/manage/badge/cfg/"}, method = {RequestMethod.GET, RequestMethod.POST})
public class LanBadgeCfgApi {

    @Resource
    private ILanBadgeCfgService lanBadgeCfgService;

    @RequestMapping("manageList")
    public BaseResponse<Object> manageList(LanBadgeCfgReq req) {
        return lanBadgeCfgService.manageList(req);
    }

    @RequestMapping("add")
    public BaseResponse<Object> add(LanBadgeCfgReq req) {
        return lanBadgeCfgService.add(req);
    }

    @RequestMapping("update")
    public BaseResponse<Object> update(LanBadgeCfgReq req) {
        return lanBadgeCfgService.update(req);
    }

    @RequestMapping("delete")
    public BaseResponse<Object> delete(Long id) {
        return lanBadgeCfgService.delete(id);
    }
}
